BIN=processbar
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
CC=gcc
LINKFLAGS=-o
FLAGS=-c
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $(LINKFLAGS) $@ $^
	@echo "linking... $^ to $@"

%.o:%.c
	@$(CC) $(FLAGS) $< -std=c99 #-g
	@echo "compiling... $< to $@"

.PHONY:clean
clean:
	@$(RM) $(BIN) $(OBJ)
	@echo "removing... $(OBJ) and $(BIN)"
